class TaskXMLParser

  def getTasksFromFile path,tasks
    f = File.read GLib::Win32.locale_filename_from_utf8(path)
    doc = Hpricot.XML f
    doc.search("//task").each do |task_row|   
      task = Task.new
      task.id = task_row.attributes["id"]
      task.parentId = task_row.attributes["parent_id"]
      task.name = task_row.attributes["name"]
      task.startTime = task_row.attributes["start_time"]
      task.deadline = task_row.attributes["deadline"]
      task.status = task_row.attributes["status"]
      task.comment = task_row.inner_text
      tasks << task
    end
  end
  
	def getConfigure path
	  doc = Hpricot.XML(File.read(path))
	  doc.search("//Local").each do |row|   
	    conf = Configure.new
	    conf.language = row.attributes["language"]
	    return conf
	  end
	end

end
